<div class="container">
	<div class="panel panel-default">
		<div class="panel-body">
			<div class="col-sm-6">
				<span class="glyphicon glyphicon-user">&nbsp;店铺管理&nbsp;</span> <span
					class="glyphicon glyphicon-chevron-right">&nbsp;店铺商品管理&nbsp;</span>
				<span class="glyphicon glyphicon-chevron-right">&nbsp;{{storeName}}&nbsp;</span>
				<span class="glyphicon glyphicon-chevron-right">&nbsp;注册新商品&nbsp;</span>
				<a href="javascript:window.history.go(-1);">返回</a>
			</div>
			<div class="col-sm-6">
				<div class="col-sm-10">
					<searchfilter selected-filter="selctedFilter" filter-str="filterStr" filter-types="filterTypes"></searchfilter>
				</div>
			</div>
		</div>
	</div>

	<div ng-init="getAllCategories()">
		<label class="control-label col-sm-2">选择商品类别：</label>
		<div class="col-sm-2">
			<select class="form-control" id="firstClass" ng-model="firstSelected"
				ng-change="changeSecondCat()"
				ng-options="item.categoryName for item in firstCategories">
			</select>
		</div>
		<div class="col-sm-2">
			<select id="secondClass" class="form-control"
				ng-model="secondSelected" ng-change="changeThirdCat()"
				ng-options="item.categoryName for item in secondCategories">
			</select>
		</div>
		<div class="col-sm-2">
			<select id="thirdClass" class="form-control" ng-model="thirdSelected"
				ng-change="getGoods()"
				ng-options="item.categoryName for item in thirdCategories">
			</select>
		</div>
		<div class="col-sm-2">
			<button type="button" class="btn btn-default" ng-click="registerGoods()">注册选中项</button>
		</div>
	</div>
	<br />
	<hr />
	<div>
		<table class="table table-striped">
			<tr>
				<th></th>
				<th><input type="checkbox" ng-checked="" ng-click="selectAll($event)"/></th>
				<th>商品编号</th>
				<th>商品名称</th>
				<th>主图片</th>
				<th>创建时间</th>
				<th>更新时间</th>
				<th>简介</th>
			</tr>

			<tr ng-repeat="item in commodities | filter: myFilter">
				<td>{{$index+1}}</td>
				<td><input type="checkbox" ng-checked="isChecked(item.commodityNo)"  ng-click="toggleCheck($event,item.commodityNo)" /></td>
				<td>{{item.commodityNo}}</td>
				<td>{{item.name}}</td>
				<td><img ng-src="{{item.pictureUrl}}" height="60px" /></td>
				<td>{{item.createTime | date:"yyyy-MM-dd hh:mm:ss"}}</td>
				<td>{{item.updateTime | date:"yyyy-MM-dd hh:mm:ss"}}</td>
				<td>{{item.introduce}}</td>
			</tr>
		</table>
	</div>
</div>
